import 'dart:convert';

class AjaxRequest {
  String msg;
  int code;
  String data;

  AjaxRequest({this.msg, this.code, this.data});

  AjaxRequest.fromJson(Map<String, dynamic> map) {
    msg = map['msg'];
    code = map['code'];
    data = json.encode(map['data']);
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['msg'] = this.msg;
    data['code'] = this.code;
    data['data'] = this.data;
    return data;
  }
}
